package cn.chiship.framework.upms.biz.system.pojo.dto;

import cn.chiship.framework.common.constants.TipConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author LiJian
 */
@ApiModel(value = "收发邮箱配置表单")
public class UpmsEmailSettingDto  {

    @ApiModelProperty(value = "邮件主题",required = true)
    @NotEmpty(message = "邮件主题"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 30)
    private String subject;

    @ApiModelProperty(value = "主机名",required = true)
    @NotEmpty(message = "主机名"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 150)
    private String host;

    @ApiModelProperty(value = "连接协议",required = true)
    @NotEmpty(message = "连接协议"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 190)
    private String transportProtocol;


    @ApiModelProperty(value = "是否启用SSL",required = true)
    @NotNull(message = "是否启用SSL"+TipConstants.NOT_EMPTY)
    @Min(0)
    @Max(1)
    private Byte isSsl;

    @ApiModelProperty(value = "SSL端口",required = true)
    @NotEmpty(message = "SSL端口"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 30)
    private String smtpSslPort;

    @ApiModelProperty(value = "端口号",required = true)
    @NotEmpty(message = "端口号"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 30)
    private String smtpPort;

    @ApiModelProperty(value = "发件人账号",required = true)
    @NotEmpty(message = "发件人账号"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 50)
    private String sendFromAddress;

    @ApiModelProperty(value = "发件人密码",required = true)
    @NotEmpty(message = "发件人密码"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 200)
    private String sendFromAddressPwd;

    @ApiModelProperty(value = "是否禁用",required = true)
    @NotNull(message = "是否禁用"+TipConstants.NOT_EMPTY)
    @Min(0)
    @Max(1)
    private Byte state;

    @ApiModelProperty(value = "类型(0 系统 1 单位 2 部门 3 个人)",required = true)
    @NotNull(message = "类型"+TipConstants.NOT_EMPTY)
    @Min(0)
    @Max(3)
    private Byte type;

    @ApiModelProperty(value = "外部引用ID",required = true)
    @NotEmpty(message = "外部引用ID"+ TipConstants.NOT_EMPTY)
    @Length(min = 1,max = 200)
    private String outreachInfoId;

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getTransportProtocol() {
        return transportProtocol;
    }

    public void setTransportProtocol(String transportProtocol) {
        this.transportProtocol = transportProtocol;
    }


    public Byte getIsSsl() {
        return isSsl;
    }

    public void setIsSsl(Byte isSsl) {
        this.isSsl = isSsl;
    }

    public String getSmtpSslPort() {
        return smtpSslPort;
    }

    public void setSmtpSslPort(String smtpSslPort) {
        this.smtpSslPort = smtpSslPort;
    }

    public String getSmtpPort() {
        return smtpPort;
    }

    public void setSmtpPort(String smtpPort) {
        this.smtpPort = smtpPort;
    }

    public String getSendFromAddress() {
        return sendFromAddress;
    }

    public void setSendFromAddress(String sendFromAddress) {
        this.sendFromAddress = sendFromAddress;
    }

    public String getSendFromAddressPwd() {
        return sendFromAddressPwd;
    }

    public void setSendFromAddressPwd(String sendFromAddressPwd) {
        this.sendFromAddressPwd = sendFromAddressPwd;
    }

    public Byte getState() {
        return state;
    }

    public void setState(Byte state) {
        this.state = state;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public String getOutreachInfoId() {
        return outreachInfoId;
    }

    public void setOutreachInfoId(String outreachInfoId) {
        this.outreachInfoId = outreachInfoId;
    }

}